Page({
  onLoad() {},
  data: {},
  getAuthCode: () => {
    my.getAuthCode({
      scopes: 'auth_user',
      success: (res) => {
        console.log(res.authCode);
        // my.alert({
        //   content: res.authCode,
        // });
        let code = res.authCode
        // console.log(res);
        // return
        my.request({
            url: 'https://unlock.xxx.com/api/Auth_login_with_wechat/login',
            data: {code:code},
            method: 'POST',
            success: (mes) => {
              console.log(mes);
            }
        });
      },
    });
  },
});

